﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_project_Project : System.Web.UI.MasterPage
{
    protected void Page_Init(object sender, EventArgs e)
    {
        // if current user is administrator
        switch (Master.CurrentUserManagement.CurrentUser.Role)
        {
            case (int)UserManagement.Role.Admin:
                {
                    break;
                }
            case (int)UserManagement.Role.ProjectLead:
                {
                    ltrAddProject.Visible = false;
                    break;
                }
            case (int)UserManagement.Role.Tester:
                {
                    ltrAddProject.Visible = false;
                    ltrAssignProject.Visible = false;
                    ltrEditProject.Visible = false;
                    break;
                }
            case (int)UserManagement.Role.Developer:
                {
                    ltrAddProject.Visible = false;
                    ltrAssignProject.Visible = false;
                    ltrEditProject.Visible = false;
                    break;
                }
            case (int)UserManagement.Role.Guest:
                {
                    ltrAddProject.Visible = false;
                    ltrAssignProject.Visible = false;
                    ltrEditProject.Visible = false;
                    break;
                }
            default:
                {
                    ltrAddProject.Visible = false;
                    ltrAddProject.Visible = false;
                    ltrAssignProject.Visible = false;
                    ltrEditProject.Visible = false;
                    break;
                }
        }
    }
}